#ifndef DATAWORD_H
#define DATAWORD_H
#include <QObject>
#include <QSqlRecord>
#include <iostream>

class Word
{

public:
    int id() const;
    void setId(int newId);
    const std::string &original() const;
    void setOriginal(const std::string &newOriginal);
    const std::string &translation() const;
    void setTranslation(const std::string &newTranslation);
    const int &vocabularyId() const;
    void setVocabularyId(const int &newVocabularyId);

    void parseRecord(const QSqlRecord&);

private:
    int m_id;            //0 到 4294967295
    std::string m_original;       //原文
    std::string m_translation;    //译文
    int m_vocabularyId;       //所属词汇
};



#endif // DATAWORD_H
